package cn.bs.busuo.mall.dao.persist.repository.impl;

import cn.bs.busuo.mall.dao.persist.mapper.CategoryMapper;
import cn.bs.busuo.mall.dao.persist.repository.ICategoryRepository;
import cn.bs.busuo.mall.pojo.entity.Goods;
import cn.bs.busuo.mall.pojo.vo.CategoryListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class CategoryRepositoryImpl implements ICategoryRepository {
    @Autowired
    CategoryMapper categoryMapper;

    @Override
    public List<CategoryListVO> list() {
        return categoryMapper.list();
    }

    @Override
    public List<CategoryListVO> listByParent(Long parentId) {
        return categoryMapper.listByParent(parentId);
    }
}
